package com.zhou.cloud.config;

import com.zhou.cloud.entry.DemoHttpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @descrition: 分布式UUID生成配置
 * @author: zhouyongjun
 * @date: 2022/11/22
 **/
@Configuration
public class UuidConfig {


    @Autowired
    RestTemplate restTemplate;

    //封装 respTemptate 和基础url
    @Bean("uuidHttpClient")
    public DemoHttpClient demoHttpClient() {
        return new DemoHttpClient("http://generator-uuid/",restTemplate);
    }


}
